package  com.views.warSoul {
    import flash.display.*;
    import flash.geom.*;

    public class Moving {

        public static function moveBeeline(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
            _arg1.x = (_arg1.x - (_arg2 * Math.sin(((_arg3 / 180) * Math.PI))));
            _arg1.y = (_arg1.y + (_arg2 * Math.cos(((_arg3 / 180) * Math.PI))));
        }
        public static function mcAngle(_arg1:Point, _arg2:Point):Number{
            var _local3:Number = (_arg1.x - _arg2.x);
            var _local4:Number = (_arg1.y - _arg2.y);
            var _local5:Number = ((270 + ((Math.atan2(_local4, _local3) * 180) / Math.PI)) % 360);
            return (_local5);
        }
        public static function rocketMoveForPoint(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:int=1):void{
            var _local7:Number = (_arg1.x - _arg2);
            var _local8:Number = (_arg1.y - _arg3);
            var _local9:Number = ((270 + ((Math.atan2(_local8, _local7) * 180) / Math.PI)) % 360);
            var _local10:Number = (((_local9 - _arg1.rotation) + 360) % 360);
            _arg6 = ((_local10 <= 180)) ? 1 : -1;
            if (_arg5){
                _arg1.rotation = ((((((_local10 < 180)) && ((_local10 > _arg5)))) || ((((_local10 > 180)) && (((360 - _local10) > _arg5)))))) ? (_arg1.rotation + (_arg5 * _arg6)) : _local9;
            } else {
                _arg1.rotation = _local9;
            };
            _arg1.x = (_arg1.x - ((_arg4 * Math.sin(((_arg1.rotation / 180) * Math.PI))) * 2));
            _arg1.y = (_arg1.y + (_arg4 * Math.cos(((_arg1.rotation / 180) * Math.PI))));
        }
        public static function pointDistance(_arg1:MovieClip, _arg2:Number, _arg3:Number):Number{
            var _local4:Number = (_arg1.x - _arg2);
            var _local5:Number = (_arg1.y - _arg3);
            var _local6:Number = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
            return (_local6);
        }

    }
}
